#!/usr/bin/python
# -*- coding:utf-8 -*-
#仿Java的HashMap
#@author: wklken@yeah.net

#第一版， 无继承   待最优化，通过dict方法   稍后确认返回值，需与java保持一致
class HashMap:
    def clear(self):
        self.data.clear()
    def containsKey(self,key):
        return key in self.data
    
    def get(self,key):
        return self.data.get(key)
    def isEmpty(self):
        return len(self.data) == 0
    def keySet(self):
        return set(self.data.keys())
    def put(self, key, value):
        self.data.update({key:value})
    def putAll(self, m):
        for key in m:
            self.data.update({key, m.get(k)})
    def remove(self, key):
        self.data.pop(key)
    def size(self):
        return len(self.data)
    def values(self):
        return self.data.values()
    
    